<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>列表页</title>
		<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<link rel="stylesheet" type="text/css" href="http://localhost/vshop/Template/default/css/public.css"/>
		<script src="http://localhost/vshop/Template/default/js/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="http://localhost/vshop/Template/default/js/public.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="http://localhost/vshop/Template/default/css/list.css"/>
	</head>
	<body>
		<!-- 头部开始 -->
		<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!-- 头部开始 -->
		<div class="haad">
			<div class="haadTop">
				    <?php if(session('uid') && session('uname')){ ?>
					<div class="haadTopL">
						您好，<a href="<?php echo U('Member/index');?>" style="color: #A10000;"><?php echo $hd['session']['uname'];?></a>&nbsp;
						<span>欢迎光临凡客诚品！</span>&nbsp;
						<a href="<?php echo U('User/out');?>" style="color: #A10000;">退出登陆</a>
					</div>
				<?php }else{ ?>
					<div class="haadTopL">
						您好，<span>欢迎光临凡客诚品！</span>&nbsp;
						<span>
							<a href="<?php echo U('User/login');?>">登陆</a>&nbsp;|&nbsp;<a href="<?php echo U('User/register');?>">注册</a>
						</span>
					</div>
				<?php } ?>
				<div class="haadTopR">
					<ul>
						<li class="topMenuBox">
							<a href="<?php echo U('Member/index');?>" class="topMenu">我的凡客</a>
							<ul>
								<li><a href="<?php echo U('Order/index');?>">我的订单</a></li>
							</ul>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<!--logo和搜索开始-->
		<div class="logoSearch">
			<div class="logoL">
				<a href="<?php echo U('Index/index');?>"></a>
			</div>
			<div class="searchR">
				<div class="searchFormBox">
					<form action="" method="post">
						<input type="text" id="keyword" value="搜“帆布鞋”，体验与众不同" /><input type="submit" id="searchSub" value="" />
					</form>
				</div>
				<div class="cartBox">
					<p><a href="#">购物车(<span>0</span>)</a></p>
					<div class="BuycarTab">
						<div id="noGoodsMsg" style="display: none;">您的购物车中没有商品</div>
						<div class="havepru">
							<h2>最近加入的商品：</h2>
							<ul>
								
							</ul>
							<div class="ShopCarPageLine"></div>
							<div class="ShopCarPage">
								<div>共计(未计算促销折扣)<span>￥0</span></div>
								<strong><a href="<?php echo U('Cart/index');?>">查看购物车(<span>0</span>件)</a></strong>
							</div>
						</div>
					</div>
				</div>
				<div class="hotWord">
					<p>热门搜索：<a href="#">吉国武</a>&nbsp;<a href="#">吉国武</a></p>
				</div>
			</div>
		</div>
		<!--logo和搜索结束-->
		<!--顶部导航开始-->
		<div class="navBox">
			<div class="allProduct">
				<span class="navCon notIndex">全部商品分类<em></em></span>
				<div class="categoryList">
					<div class="categpost">
						<?php foreach ($topCate as $tk=>$tv){?>
							<dl>
								<h3><a href="<?php echo U('List/index',array('cid'=>$tv['cid']));?>"><?php echo $tv['cname'];?></a></h3>
								<?php foreach ($cateData as $ck=>$cv){?>
									    <?php if($tv['cid']==$cv['pid']){ ?>
										<dt><a href="<?php echo U('List/index',array('cid'=>$cv['cid']));?>"><?php echo $cv['cname'];?></a></dt>
										<dd>
											<?php foreach ($cateData as $sk=>$sv){?>
												    <?php if($cv['cid']==$sv['pid']){ ?>
													<a href="<?php echo U('List/index',array('cid'=>$sv['cid']));?>"><?php echo $sv['cname'];?></a>
												<?php } ?>
											<?php }?>
										</dd>
									<?php } ?>
								<?php }?>
							</dl>
						<?php }?>
					</div>
				</div>
			</div>
			<div class="navListBox">
				<ul>
					<?php foreach ($topCate as $k=>$v){?>
						<li><a href="<?php echo U('List/index',array('cid'=>$v['cid']));?>"><?php echo $v['cname'];?></a></li>
					<?php }?>
				</ul>
			</div>
		</div>
		<!--顶部导航结束-->
		<!-- 头部结束 -->
		<!-- 头部结束 -->
		<div id="all">
			<div id="listDescribe">
				<div class="DescribeLeft">
					<span>当前位置：</span>
					<a href="<?php echo U('Index/index');?>">首页</a><span>&gt;</span>
					<?php foreach ($fatherCateArr as $fck=>$fcv){?>
						    <?php if($fcv['cid']==$_GET['cid']){ ?>
							<span style="color: #000000;"><?php echo $fcv['cname'];?></span>
						<?php }else{ ?>
							<a href="<?php echo U('List/index',array('cid'=>$fcv['cid']));?>"><?php echo $fcv['cname'];?></a><span>&gt;</span>
						<?php } ?>
					<?php }?>
				</div>
				<div class="DescribeRight">找到和<span class="DescribeRight1"><?php echo $gNumNowCate['cname'];?></span>相关商品<span class="DescribeRight2"><?php echo $gNumNowCate['gnum'];?></span>件</div>
			</div>
			<div id="listOption">
				<ul>
					<?php foreach ($sonCids as $sck=>$scv){?>
						    <?php if($scv['cid']==$_GET['cid']){ ?>
							<li class="listOptionLeft"><?php echo $scv['cname'];?></li>
						<?php }else{ ?>
							<li><a href="<?php echo U('index',array('cid'=>$scv['cid']));?>"><?php echo $scv['cname'];?></a><span>(<?php echo $scv['goodsnum'];?>)</span></li>
						<?php } ?>
					<?php }?>
				</ul>
			</div>
			
			<div id="attr-box">
				<div class="attr">
					<ul>
						<?php foreach ($attr as $atk=>$atv){?>
							<?php
							$temp = $param;
							$temp[$atk] = 0;
							?>
							<li class="attr-border">
								<h2><?php echo $atv['taname'];?>：</h2>
								<ul class="attr-content">
									<li>
										<a href="<?php echo U('index',array('cid'=>$_GET['cid'],'param'=>implode('_',$temp)));?>"     <?php if($param[$atk]==0){ ?>class="hover"<?php } ?>>不限</a>
									</li>
									<?php foreach ($atv['value'] as $atak=>$atav){?>
										<?php
										$temp[$atk] = $atav['gaid'];
										?>
										<li>
											<a href="<?php echo U('index',array('cid'=>$_GET['cid'],'param'=>implode('_',$temp)));?>"     <?php if($param[$atk]==$atav['gaid']){ ?>class="hover"<?php } ?>><?php echo $atav['gavalue'];?></a>
										</li>
									<?php }?>
								</ul>
							</li>
						<?php }?>
					</ul>
				</div>
			</div>
			
			<div id="floatDiv">
				<div class="floatDivTop">
					<div class="floatDivTopLeft"><a href="">全部商品</a></div>
					
				</div>
				
				<div class="floatDivBottom">
					<div class="floatDivBottomUl">
						<ul>
							<li class="moren">
								<?php
								if($_GET['order'] == 0){
									$order = 1;
								}elseif($_GET['order']==1){
									$order = 0;
								}else{
									$order = 0;
								}
								?>
								<a class="track" href="<?php echo U('index',array('cid'=>$_GET['cid'],'order'=>$order,'param'=>implode('_',$param)));?>"><em>最热</em>
								<span     <?php if($_GET['order']==0){ ?>class="upTrendBottomRed"<?php }else if($_GET['order']==1){ ?>class="BottomTrendUpRed"<?php }else{ ?>class="upTrendBottom"<?php } ?>>按推荐由高到低</span></a>
							</li>
			                <!-- <li class="xiaoliang">
			                	<?php
								if($_GET['order'] == 2){
									$order = 3;
								}elseif($_GET['order']==3){
									$order = 2;
								}else{
									$order = 2;
								}
								?>
			                    <a class="track" href="<?php echo U('index',array('cid'=>$_GET['cid'],'order'=>$order,'param'=>implode('_',$param)));?>"><em>销量</em>
			                    <span     <?php if($_GET['order']==2){ ?>class="upTrendBottomRed"<?php }else if($_GET['order']==3){ ?>class="BottomTrendUpRed"<?php }else{ ?>class="upTrendBottom"<?php } ?>>按销量由高到低</span></a>
			                </li>
			                <li class="haoping">
			                	<?php
								if($_GET['order'] == 4){
									$order = 5;
								}elseif($_GET['order']==5){
									$order = 4;
								}else{
									$order = 4;
								}
								?>
			                    <a class="track" href="<?php echo U('index',array('cid'=>$_GET['cid'],'order'=>$order,'param'=>implode('_',$param)));?>"><em>好评</em>
			                    <span     <?php if($_GET['order']==4){ ?>class="upTrendBottomRed"<?php }else if($_GET['order']==5){ ?>class="BottomTrendUpRed"<?php }else{ ?>class="upTrendBottom"<?php } ?>>按评价从高到低</span></a>
			                </li> -->
			                <li class="zuixin">
			                	<?php
								if($_GET['order'] == 6){
									$order = 7;
								}elseif($_GET['order']==7){
									$order = 6;
								}else{
									$order = 6;
								}
								?>
			                    <a class="track" href="<?php echo U('index',array('cid'=>$_GET['cid'],'order'=>$order,'param'=>implode('_',$param)));?>"><em>最新</em>
			                    <span     <?php if($_GET['order']==6){ ?>class="upTrendBottomRed"<?php }else if($_GET['order']==7){ ?>class="BottomTrendUpRed"<?php }else{ ?>class="upTrendBottom"<?php } ?>>上架新品</span></a>
			                </li>
							<li class="floatDivBottomUlLi">
								<?php
								if($_GET['order'] == 8){
									$order = 9;
								}elseif($_GET['order']==9){
									$order = 8;
								}else{
									$order = 8;
								}
								?>
								<a href="<?php echo U('index',array('cid'=>$_GET['cid'],'order'=>$order,'param'=>implode('_',$param)));?>"><em>价格</em>
								<span     <?php if($_GET['order']==8){ ?>class="upTrendBottomRed"<?php }else if($_GET['order']==9){ ?>class="BottomTrendUpRed"<?php }else{ ?>class="upTrendBottom"<?php } ?>></span></a>
								<!-- <span></span>
								<ul>
									<li><a href=""><em>价格</em><span class="upTrendBottom"></span></a></li>
									<li><a href=""><em>折扣</em><span class="upTrendBottom"></span></a></li>
									<li><a href=""><em>直降</em><span class="upTrendBottom"></span></a></li>
								</ul> -->
							</li>
						</ul>
					</div>
					
					<div class="searchbarPrice">
						<div class="searchbarPriceTop">
							<form action="" method="post">
								<input type="text" name="pstart" id="" value="" />
								<span>-</span>
								<input type="text" name="pend" id="" value="" />
								<input type="submit" value="查询" class="sPriceBtn" />
							</form>
						</div>
					</div>
					
					<div class="combineSame">
						<a href="">合并同款</a>
					</div>
				</div>
			</div>
			
			<div id="content">
				    <?php if(empty($goodsData)){ ?>
					<p>本分类下还没有商品</p>
				<?php }else{ ?>
					<?php foreach ($goodsData as $gk=>$gv){?>
						<div class="contentDiv">
							<div class="contentImg">
								<a href="<?php echo U('Content/index',array('gid'=>$gv['gid']));?>"><img src="http://localhost/vshop/<?php echo $gv['gpic'];?>"/><i></i></a>
							</div>
							<a class="contentDivA" style="height: 20px;overflow: hidden;" href="<?php echo U('Content/index',array('gid'=>$gv['gid']));?>"><?php echo $gv['gname'];?></a>
							<span>售价￥<?php echo $gv['gshopprice'];?></span>
						</div>
					<?php }?>
				<?php } ?>
			</div>
			<div id="page"><?php echo $pageData;?></div>
			<div class="foot">
				<ul>
					<li>
						<h2>关于凡客</h2>
						<p><a href="#">公司简介</a></p>
					</li>
					<li>
						<h2>关于凡客</h2>
						<p><a href="#">公司简介</a></p>
					</li>
					<li>
						<h2>关于凡客</h2>
						<p><a href="#">公司简介</a></p>
					</li>
					<li>
						<h2>关于凡客</h2>
						<p><a href="#">公司简介</a></p>
					</li>
					<li>
						<h2>关于凡客</h2>
						<p><a href="#">公司简介</a></p>
					</li>
					<li class="footLine">
						<h2>关于凡客</h2>
						<p><a href="#">公司简介</a></p>
					</li>
				</ul>
			</div>
		</div>
		<div class="copyRight">
			<div class="copyRightTab"><p>Copyright 2007 - 2014 vancl.com All Rights Reserved 京ICP证100557号 京公网安备11011502002400号 出版物经营许可证新出发京批字第直110138号</p></div>
		</div>
	</body>
</html>
